home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / HyperCuber Source / HyperCuber 2.0 Source.sit / HyperCuber 2.0 Source / CNCubeDialog.cp < prev    next >
Text File  |  1994-05-02  |  2KB  |  85 lines

  1. //|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2. //| CNCubeDialog.cp
  3. //|
  4. //| This implements the n-cube dialog
  5. //|_________________________________________________________
  6.  
  7. #include "CNCubeDialog.h"
  8. #include "CHyperCuberDoc.h"
  9. #include "CNCubeDialogDirector.h"
  10.  
  11. #include "HyperCuber Balloons.h"
  12. #include "HyperCuber Commands.h"
  13.  
  14. #include <CButton.h>
  15. #include <CDecorator.h>
  16. #include <CEditText.h>
  17. #include <CIntegerText.h>
  18. #include <CPaneBorder.h>
  19.  
  20. #include <string.h>
  21.  
  22. extern CDecorator         *gDecorator;
  23.  
  24.  
  25.  
  26. //|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  27. //| CNCubeDialog::INCubeDialog
  28. //|
  29. //| Purpose: Initialize the n-cube dialog.
  30. //|
  31. //| Parameters: WindowID:   ID of WIND resource to use
  32. //|             enclosure:  the Desktop
  33. //|             supervisor: the supervisor of this dialog
  34. //|______________________________________________________________________________
  35.  
  36. void CNCubeDialog::INCubeDialog(short WindowID, CDesktop *enclosure, CDirector *supervisor)
  37. {
  38.  
  39.     CButton        *button;
  40.     
  41. #define OKAY_BUTTON_ID        130
  42. #define CANCEL_BUTTON_ID    131
  43.  
  44.     CDialog::IDialog(WindowID, enclosure, supervisor);    //  Initialize window from WIND resource
  45.  
  46.     helpResID = WINDOW_HELP_RES;                    //  Link in the Balloon Help
  47.  
  48.     button = new(CButton);                            //  Set up the okay button
  49.     button->IButton(OKAY_BUTTON_ID, this, this);
  50.     button->Offset(200, 50, TRUE);
  51.     button->SetClickCmd (cmdOK);
  52.     button->helpResIndex = kNCubeOkay;
  53.     SetDefaultButton(button);
  54.     
  55.     button = new (CButton);                            //  Set up the cancel button
  56.     button->IButton(CANCEL_BUTTON_ID, this, this);
  57.     button->Offset(100, 50, TRUE);
  58.     button->SetClickCmd (cmdCancel);
  59.     button->helpResIndex = kNCubeCancel;
  60.  
  61.     CEditText *text = new(CEditText);                    //  Set up the prompt text
  62.     text->IEditText(this, this, 200, 16,
  63.                     10, 10, sizFIXEDLEFT, sizFIXEDTOP, -1);
  64.     text->SetTextString("\pDimension of new n-cube:");
  65.     text->SetFontNumber(systemFont);
  66.     text->SetFontSize(12);
  67.     text->SetWantsClicks(FALSE);
  68.     text->Specify(kNotEditable, kNotSelectable, kNotStylable);
  69.  
  70.     dimension = new(CIntegerText);                        //  Set up the dimension text
  71.     dimension->IIntegerText(this, this, 40, 16, 
  72.                         200, 10,
  73.                             sizFIXEDLEFT, sizFIXEDTOP, -1);
  74.     dimension->SetFontNumber(systemFont);
  75.     dimension->SetFontSize(12);
  76.     dimension->SpecifyRange(3, 14);
  77.     dimension->helpResIndex = kNCubeDimension;
  78.  
  79.     gDecorator->CenterWindow(this);                        //  Center the window on the screen
  80.  
  81. }    //=== CNCubeDialog::INCubeDialog() ===\\
  82.  
  83.  
  84.  
  85.